// 使用 fetch 发起 GET 请求
fetch('http://localhost:3000/mi/goods/bata')
  .then(response => response.json())
  .then(data => {
    // console.log(data)
    const list = document.getElementById('swiper-wrapper');
    // console.log(list)
    data.forEach(item => {
      list.innerHTML += `
             <div class="product-data">
                <div class="picture"><img src="" alt=""></div>
                <div class="txt">
                  <p>${item.name}</p>
                  <p>￥ <b>${item.name}</b>起</p>
                </div>
              </div>
        `
      // http://localhost:3000/img/swiper7.png
    });
  })
  .catch(error => console.error('Error:', error));

